<template>
  <div>
		<BreadCrumb />
		<el-table border :data="tableData.records">
			<el-table-column label="姓名" prop="name"></el-table-column>
			<el-table-column label="手机号" prop="phone"></el-table-column>
			<el-table-column label="电子信箱" prop="email"></el-table-column>
			<el-table-column label="状态">
				<template #default="scope">
					<el-tag v-if="scope.row.active" type="success">启用</el-tag>
					<el-tag v-else type="danger">禁用</el-tag>
				</template>
			</el-table-column>
		</el-table>
		<el-pagination
			background
			layout="prev, pager, next"
			v-model:current-page="params.pageNo"
			:page-count="tableData.pages"
			@current-change="getTableData"/>
  </div>
</template>

<script setup>
import BreadCrumb from '@@/menu/breadcrumb'
import { reactive, ref } from 'vue'
import { get } from '@/axios'
const tableData = ref({})
const params = reactive({
	pageNo: 1,
	pageSize: 9
})
getTableData()
function getTableData () {
	get('/umsAdmin/list', params, content => {
		tableData.value = content
		console.dir(content)
	})
}
</script>

<style scoped lang="scss">
.el-pagination {
	margin-top: 10px;
}
</style>